home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir35 / arcpy172.zip / ARCOPY.DOC < prev   
Text File  |  1993-02-16  |  16KB  |  301 lines

  1.  
  2.                                   ARCOPY.DOC
  3.                                   ----------
  4.                          Instructions for ARCOPY.COM
  5.                           Version 1.72 (16 Feb 1993)
  6.  
  7.                              (c)1988-93 E. Meyer
  8.  
  9.  
  10.      ARCOPY (ARchive COPY) is a small, fast file copy utility for all MSDOS 
  11. (2.x and above) systems.  Its features are geared toward the task of backing 
  12. up (archiving) files, but it can also simplify ordinary file copying, moving, 
  13. and renaming.
  14.      ARCOPY is designed for command line aficionados who want to be able to do 
  15. as much as possible at one DOS prompt.  It can copy different groups of files 
  16. at once; copy all except certain files; backup files by time stamp or archive 
  17. flag; select files to copy by existence on destination directory, or by 
  18. prompting the user individually; move files easily from one directory to 
  19. another; do ambiguous copying and renaming safely; and more.
  20.  
  21.      The syntax and options of ARCOPY are compatible with my DTA (directory/ 
  22. tree/attribute), DIRCMP (directory compare), and DLT (delete) file utilities, 
  23. which work well together.
  24.  
  25.  
  26.                                  USING ARCOPY
  27.                                  ------------
  28.  
  29. SYNTAX:   A>ARCOPY source{,source2,...} {dest} {/options}      "{}"=optional
  30.  
  31.          "source,etc" - filespec(s) to copy from.
  32.                "dest" - directory and/or filespec to copy to.
  33.             "options" - follow slash "/"; see below for list.
  34.  
  35.      Like the DOS COPY or XCOPY command, ARCOPY expects two arguments: a 
  36. source and a destination filespec.  Any filespec may contain a path and/or 
  37. wildcards.  Common device names (CON,PRN...) are also accepted.  If the 
  38. destination is not completely specified, its directory defaults to the current 
  39. one, and its filename to the same as the source file.
  40.  
  41.      However, the source may be a list of files as well, delimited with 
  42. commas; if so, the previous filespec's drive and directory carry over to the 
  43. next, unless the next begins with a drive or root directory.
  44.  
  45.      ARCOPY lists files in each source filespec alphabetically as it processes 
  46. them; you may abort at any time by typing ^C.  If the destination names are 
  47. different, both names are shown: OLDFILE.NAM -> NEWFILE.NAM.
  48.  
  49.  
  50. OPTIONS:      "Options" must be preceded by one slash "/"; separating 
  51.          spaces, and further slashes, are optional.  The /A,M,P 
  52.          options are identical to those of the DOS XCOPY utility; the 
  53.          /H,W,Z options resemble those of the CP/M PIP utility, if 
  54.          anyone remembers that.
  55.  
  56. /? -  display help message
  57.  
  58. /A -  only files with the ARCHIVE attribute will be copied.  (See "Incremental 
  59.     Backup" below for further explanation.)
  60. /B -  only files with timestamp BEFORE specified date/time (see formats below) 
  61.     will be copied.  (Defaults are today, 0 hours.)
  62. /E -  only files previously EXISTING on the destination directory will be 
  63.     copied.  (Normally used together with /T,A,M for incremental backup.)
  64. /H -  HIDDEN and System files, normally ignored, will be found and copied 
  65.     along with normal files.
  66. /L -  only files with timestamp LATER than specified date/time (see formats 
  67.     below) will be copied.  (Defaults are today, 0 hours.)
  68. /M - only files with the Archive attribute are copied, and then MARKED by 
  69.     having their Archive attribute removed.  (See "Incremental Backup" below.)
  70. /N -  only files previously NOT existing on the destination directory will be 
  71.     copied.
  72. /P -  you will be PROMPTED "y/n?" for each file about to be processed.  Press 
  73.     "Y" to copy the file, or "N" to skip it.
  74. /R -  files will be RENAMED or moved: renamed, if the directory is the same; 
  75.     moved, if the destination directory is different.
  76. /T -  existing files on the destination directory will only be overwritten if 
  77.     the source copy has a more recent TIMESTAMP.
  78. /W -  copying may WRITE over or delete Read-only files.  (Normally, any 
  79.     attempt to do this will cause a DOS error.)
  80. /X -  all files (*.*) EXCEPT those named will be copied.  (This option 
  81.     requires a single source, not a comma-delimited list.)
  82. /Z -  the high (parity) bit will be ZEROED in the output file, which converts 
  83.     nonstandard data (like WordStar text) into readable ASCII form.
  84.  
  85.  
  86.                          INCREMENTAL BACKUP: /A,E,M,T
  87.  
  88.      It's important to maintain backup copies of important data, but this can 
  89. be a tedious task.  Fortunately you don't need to remember exactly which files 
  90. have been modified recently; there are two automatic ways to update disks by 
  91. selecting and copying just those files that need it ("incremental backup").
  92.  
  93. (1) THE ARCHIVE ATTRIBUTE
  94.      MSDOS maintains an attribute called Archive in a file's directory entry.  
  95. Whenever a file is modified, this attribute is set.  Consequently, if this 
  96. attribute was cleared in the past (the last time you did a backup), the files 
  97. which now have it set are those you have created or changed since, and need to 
  98. back up now.
  99.      ARCOPY can copy just those modified files, and (if you want) clear their 
  100. attribute again to indicate they have been archived.  So all you have to type 
  101. each time you want to back up the contents of a directory to disk B: is:
  102.                              ARCOPY *.* B: /M
  103. In conjunction with this, when you are first setting up your disks, you may 
  104. find a use for a utility that can manually set or clear the Archive attribute 
  105. on groups of files, such as my DTA.COM.
  106.      The /A option works the same way, but does not reset the Archive 
  107. attribute on files after copying.  The /E option can be added to either one, 
  108. in order to archive only a certain group of files (see below).
  109.      (Users of DOS 3.x or later should look up the ATTRIB and XCOPY utilities 
  110. in their DOS manual for an alternative approach to the task.)
  111.  
  112. (2) THE TIMESTAMP
  113.      If your computer's clock maintains the correct time and date, the MSDOS 
  114. file timestamp can also be used to determine whether one copy of a file has 
  115. been modified more recently than another.  Thus, you can also back up files by 
  116. typing:                      ARCOPY *.* B: /T
  117. Files that already exist on B: will only be copied if the source copy is more 
  118. recent.  In addition, all files that don't already exist on the destination 
  119. directory will be copied, so B: will become a full backup for the current 
  120. directory.  If you want to avoid this, add the /E option:
  121.                              ARCOPY *.* B: /E/T
  122. This time only files already existing on B: are updated.  This allows B: to be 
  123. the backup for only a certain group of files in the current directory (which 
  124. can therefore be backed up on multiple disks).
  125.      This method of backup is generally the easiest to use.
  126.  
  127.  
  128.                          COPYING BY TIME STAMPS: /B,L
  129.  
  130.      With the /B and /L options, you can choose to copy only files dated 
  131. before or later than a given date or time.  (You can even use both together, 
  132. to specify an interval of time.)
  133.      In either case, the date and/or time should follow the option letter; if 
  134. both are specified, separate them with a comma.  If the time is omitted, it 
  135. defaults to 0 hours (12 AM); if the date is omitted, it defaults to TODAY.  
  136. ARCOPY recognizes U.S., European, and Numeric formats for entering each, by 
  137. the punctuation used:
  138.        U.S.(M/D/Y,H:MMa-p)    Euro (D.M.Y,H:MM)     Num (Y-M-D,HHMM)
  139.           3/25/90,1:45p    =    25.3.90,13:45    =    90-3-25,1345
  140. (If you add the /A or /P option after a Euro format time, insert a slash or 
  141. space so it doesn't look like a U.S. format time.)
  142.      To make selecting files by age more convenient, you can specify a time so 
  143. many days or hours AGO simply by using a "-" sign: thus "-3" means 3 DAYS ago, 
  144. "-,2" means 2 HOURS ago.  Examples:
  145.               /L                  today (later than today, 0:00)
  146.               /L-,1               in the last hour
  147.               /B12:45a            before 12:45 AM today
  148.               /L25.3.90,13:00     later than March 25 1990, 1 PM
  149.               /L89-12-1 /B90-1-1  any time in December 1989
  150.  
  151.  
  152.                         MOVING AND RENAMING FILES: /R
  153.  
  154.      The /R option has powerful moving and renaming features, depending on the 
  155. circumstances of its use.  If the destination is another drive, files are 
  156. copied and then the originals are deleted.  If it is another directory on the 
  157. same drive, files are quickly re-assigned to the new directory.  If it is the 
  158. same directory, files are simply renamed.  Examples:
  159.        ARCOPY B: A: /R            move all files from drive B: to A:
  160.        ARCOPY *.DOC \NEW /R       move files *.DOC from current dir to \NEW
  161.        ARCOPY *.DOC,*.TXT * /R    remove filetype from all files *.DOC,*.TXT
  162.  
  163.  
  164.                            MISCELLANY: /H,N,P,W,X,Z
  165.  
  166.      The /H,/P,/W,/Z options are all quite straightforward.  /N can be useful 
  167. for reconciling two directories in a simple situation where different versions 
  168. of the same file aren't an issue; it copies only files that aren't already in 
  169. the destination directory.  /X will copy all files except those named in the 
  170. source filespec -- note that it cannot be used with a comma-delimited list.  
  171. Examples:
  172.        ARCOPY *.COM,*.EXE B: /N   copy all COM/EXE files not already on B:
  173.        ARCOPY TEMP.NOT A: /X      copy all files except TEMP.NOT to A:
  174.  
  175.  
  176.                           SAFE COPYING AND RENAMING
  177.  
  178.      Renaming groups of files (or copying them to new names) can create 
  179. unexpected problems.  If the wildcards match exactly (as in *.DOC to *.BAK) 
  180. it's straightforward enough.  But (unlike COPY or XCOPY) ARCOPY also lets you 
  181. do more complex renaming safely, when it's difficult to forsee results which 
  182. depend on the specific filenames encountered.  Suppose you want to create 
  183. backup copies on drive B: of some text files on drive A:.  You might type:
  184.                          ARCOPY A:*.* B:*.BAK
  185. Now, if the files on drive A: were KLAATU.DOC, GORT.DOC, and NIKTO, this would 
  186. work just fine, and ARCOPY would create copies (B:KLAATU.BAK etc) as intended.
  187.      But suppose there had been a fourth file A:GORT.TXT.  Both it and 
  188. GORT.DOC would have to be copied to the same destination B:GORT.BAK, causing 
  189. one file to overwrite the other, which is likely to be a bad idea.  The DOS 
  190. copy commands go ahead and do this, and you'd think you had copies of all four 
  191. files, when you only had three.  ARCOPY is more intelligent: before processing 
  192. each group of files (here *.*), it checks to make sure their output names are 
  193. all different from one another (and from those of any previous groups), and if 
  194. not it will give a warning ("Conflict") and skip the group.
  195.      Similarly, ARCOPY will warn of situations where a file would be copied 
  196. onto itself and destroyed ("Overwrite") or an illegal filename would be 
  197. created ("Illegal"), and skip the offending group; the DOS commands allow the 
  198. error to occur, then announce it and quit.
  199.  
  200.  
  201.                                 ABOUT DEVICES
  202.  
  203.      MSDOS provides a number of "device names" which may be used in place of a 
  204. filename, as either source or destination.  ARCOPY fully supports these: AUX, 
  205. COM1-4, CON, LPT1-2, LST, PRN, NUL.  The most useful are:
  206.               CON - the console (keyboard input, screen output)
  207.               PRN - printer output
  208. Console input is terminated with ^Z, RETURN.  (Certain disk file specific 
  209. options are not allowed with device I/O.  Note also that ARCOPY reads disk 
  210. files as binary data, and does NOT treat ^Z as an end of file marker.)  
  211. Example:      ARCOPY PAPER.DOC CON /Z    types word processor file PAPER.DOC
  212.                                          onscreen in ASCII
  213.  
  214.  
  215.  
  216.                               CUSTOMIZING ARCOPY
  217.                               ------------------
  218.  
  219.      You can use DEBUG or a similar utility (like the Norton disk editor) to 
  220. change ARCOPY's text colors (on IBM PC compatibles).  Use of contrasting 
  221. colors can make the display more easily readable.  All values below are in 
  222. hexadecimal.  (Note: the addresses shown are for DEBUG; for most disk editors, 
  223. subtract 0100.)
  224.  
  225.    ADDRESS    ORIGINAL
  226. IN ARCOPY.COM  VALUE     FUNCTION               POSSIBLE VALUES
  227.     0108         FF    Use color output?      00=no, FF=yes
  228.     0109         07    Message color          00-FF \
  229.     010A         0F    Filename color         00-FF  >see below
  230.     010B         07    Error color            00-FF /
  231.  
  232.      COLOR OUTPUT:  With this set to FF, ARCOPY will use PC BIOS output for a 
  233. color display on IBM PC compatibles.  If you set this to 00, ARCOPY will use 
  234. standard DOS output.
  235.  
  236.      COLORS:  Specify each color by a pair of hex digits for background and 
  237. foreground, according to the following codes:
  238.          0 = BLACK   4 = red       8 = GREY           C = bright red
  239.          1 = blue    5 = magenta   9 = bright blue    D = bright magenta
  240.          2 = green   6 = brown     A = bright green   E = yellow
  241.          3 = cyan    7 = WHITE     B = bright cyan    F = BRIGHT WHITE
  242. For example, "17" means "blue background, white text".
  243.      All monochrome screens can display black, white, and bright white; in 
  244. some cases, grey may also be visible.
  245.      Colors 8-F should generally be avoided as background colors because they 
  246. produce blinking video.  On EGA/VGA displays, if blinking video is disabled, 
  247. the whole range of background colors will be available.
  248.  
  249.      EXAMPLE:  To change the error color to yellow on red, type "DEBUG 
  250. ARCOPY.COM", then "E010B 4E", then "W", then "Q".
  251.  
  252.      Please distribute copies of ARCOPY with original settings only, to avoid 
  253. confusing other users.
  254.  
  255.  
  256.  
  257.                                 ERROR MESSAGES
  258.  
  259.     <Bad argument>  Missing, illegal, or invalid filespec or option
  260.    <Bad directory>  Nonexistent drive/directory
  261.        <Overwrite>  Destination would have been the same as source
  262.         <Conflict>  Two sources would have copied to the same destination
  263.          <Illegal>  A file with an illegal name would have been constructed
  264.         <Overflow>  Too many files (over 1000; try copying fewer at once)
  265.       <Read error>  DOS error opening or reading source file
  266.      <Write error>  DOS error on output: full disk, read-only file, etc
  267.        <No memory>  Not enough memory available
  268.          <Aborted>  User pressed ^C to abort operation
  269.  
  270.      If an error occurs, ARCOPY sets the DOS error code, so that batch files 
  271. can test the ERRORLEVEL to determine subsequent action.  Normally 0, the value 
  272. returned will be the sum of whichever of the following errors occurred:
  273.      1 = bad argument/option/directory   16 = disk error (read/write)
  274.      2 = out of memory                  128 = user abort
  275.      4 = files skipped (overwrite/conflict/illegal/overflow)
  276.  
  277.  
  278.                                    HISTORY
  279.  
  280. ARCOPY 1.0  (Mar88) - First release, based on my previous CP/M utility ARCOPY.
  281.        1.1  (Jul88) - New options /T, /?.  Improved parsing.
  282.        1.2  (Apr89) - Comma-delimited multiple source lists.
  283.        1.3  (Oct89) - Improved efficiency of copying and moving files.
  284.        1.4  (Dec89) - New options /B, /L.  Improved parsing.
  285.        1.5  (May90) - Small fixes; simplified multiple-source syntax.
  286.        1.6  (Apr91) - New option /X.  Small fixes.
  287.        1.7  (May91) - US/Euro/Numeric time,date formats.  Small fixes.
  288.        1.71 (Oct91) - Improved conflict detection; sets DOS ERRORLEVEL.
  289.        1.72 (Feb93) - /B,L accept "-" for "ago"; color output.
  290.  
  291.      ARCOPY and its documentation are (c)1988-93 E.Meyer, all rights reserved.  
  292. They may be freely distributed, but not modified or sold for profit without my 
  293. written consent.  (Exception: Libraries may charge up to $6 for a disk.)  The 
  294. user takes full responsibility for any damages resulting from the use of this 
  295. program.  For a disk with the latest versions of all my programs send $10 to:
  296.  
  297.                  Eric Meyer
  298.               3541 Smuggler Way              CompuServe [74415,1305]
  299.            Boulder, CO  80303  USA
  300.  
  301.